import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    LoginUser:sessionStorage.getItem("LoginUser")
        ? JSON.parse(sessionStorage.getItem("LoginUser"))
        :null
  },
  mutations: {
    //设置
      initUser(state,payload){
        state.LoginUser = payload;
      }
  },
  actions: {
  },
  modules: {
  },
  getters:{
    getLoginUser(state){
      return state.LoginUser;
    }
  }
})
